<?php if ($comfy['fc'] == true) : ?>
<?php
$left_categories = ARRAY(); // initiate
$right_categories = ARRAY(); // initiate

for ( $i = 1; $i <= $comfy['leftcatsN']; $i++ ) {
	array_push($left_categories, $comfy['leftcats'.$i]);
}

for ( $i = 1; $i <= $comfy['rightcatsN']; $i++ ) {
	array_push($right_categories, $comfy['rightcats'.$i]);
}

if ($sec == 1) $sec_name = $left_categories;
if ($sec == 2) $sec_name = $right_categories;
?>

<?php foreach($sec_name as $section) { ?>

<div class="cat-widget" id="<?php print get_cat_name($section); ?>">

	<h3><a href="<?php print get_category_link($section); ?>" title="<?php print get_cat_name($section); ?>"><?php print get_cat_name($section); ?></a><a href="#minimize" class="minimize"></a><a href="#close" class="close"></a></h3>
	<div class="container">
	
		<?php $getposts = new WP_query(); $getposts->query('showposts=1&cat='.$section); ?>
		<?php global $wp_query; $wp_query->in_the_loop = true; ?>
		<?php while ($getposts->have_posts()) : $getposts->the_post(); ?>
		<div class="cpost">
		<div class="thumb"><?php show_thumb($comfy['MTwidth'],$comfy['MTheight'],$comfy['crop'],$comfy['quality']); ?></div>
		<div class="info">

		<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="dark_perm"><?php the_title(); ?></a>
		<p><?php print do_excerpt(get_the_excerpt(), 15); ?></p>
		
		<span class="ex">
		<a href="<?php the_permalink(); ?>" class="cont"><?php print CONTINUE_TEXT; ?></a>
		<a href="<?php the_permalink(); ?>#comments" class="comm"><?php comments_number(NO_COMMENTS,ONE_COMMENT,MORE_COMMENTS); ?></a>
		</span><div class="clear"></div>
		
		</div><div class="clear"></div>
		</div>
		<?php endwhile; ?>

		<script type="text/javascript">
		</script>

		<h4><?php print MORE_STORIES; ?><a href="#more" class="plus"></a><a href="#less" class="minus"></a></h4>

		<ul class="more_stories">
		<?php $getposts = new WP_query(); $getposts->query('showposts=10&offset=1&cat='.$section); ?>
		<?php global $wp_query; $wp_query->in_the_loop = true; ?>
		<?php while ($getposts->have_posts()) : $getposts->the_post(); ?>
		<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
		<?php endwhile; ?>
		</ul>

	</div>
	<div class="footer"></div>

</div>

<?php } ?>
<?php endif; ?>